1 Public Class FrmDEFFECTIVE_RETURN_PENDING
2
3 Private Sub cmdcancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdcancel.Click
4 Me.Close()
5 End Sub
6
7 Private Sub FrmDEFFECTIVE_RETURN_PENDING_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
8 'MsgBox(12)
9 sqlSTR = "SELECT TBL_Deffective_PO.DEF_PO_ID AS 'Defective ID', TBL_Deffective_PO.Purchase_ID as 'Purchase ID', TBL_Deffective_PO.SupplierName as 'Supplier Name', TBL_Deffective_PO.Delivery_Term as 'Delivery Term', TBL_Deffective_PO.Return_Date as 'Purchase Date' " & _
10 "FROM TBL_Deffective_PO " & _
11 "WHERE TBL_Deffective_PO.DEF_PO_ID NOT IN (SELECT DEF_PO_ID FROM TBL_Deffective_PO_Return) " & _
12 " AND TBL_Deffective_PO.Return_Date ='" & Format(dtreturn.Value, "MM/dd/yyyy") & "'"
13 FillListView(ExecuteSQLQuery(sqlSTR), lstreturn, 0)
14 End Sub
15
16 Private Sub dtreturn_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtreturn.ValueChanged
17 'sqlSTR = "SELECT TBL_Deffective_PO.Purchase_ID as 'Purchase ID', TBL_Deffective_PO.SupplierName as 'Supplier Name', TBL_Deffective_PO.Delivery_Term as 'Delivery Term', TBL_Deffective_PO.Return_Date as 'Purchase Date' " & _
18 ' "FROM TBL_Deffective_PO " & _
19 ' "WHERE TBL_Deffective_PO.Purchase_ID NOT IN (SELECT Purchase_ID FROM TBL_Deffective_PO_Return) " & _
20 ' " AND TBL_Deffective_PO.Return_Date ='" & Format(dtreturn.Value, "MM/dd/yyyy") & "'"
21 sqlSTR = "SELECT TBL_Deffective_PO.DEF_PO_ID AS 'Defective ID', TBL_Deffective_PO.Purchase_ID as 'Purchase ID', TBL_Deffective_PO.SupplierName as 'Supplier Name', TBL_Deffective_PO.Delivery_Term as 'Delivery Term', TBL_Deffective_PO.Return_Date as 'Purchase Date' " & _
22 "FROM TBL_Deffective_PO " & _
23 "WHERE TBL_Deffective_PO.DEF_PO_ID NOT IN (SELECT DEF_PO_ID FROM TBL_Deffective_PO_Return) " & _
24 " AND TBL_Deffective_PO.Return_Date ='" & Format(dtreturn.Value, "MM/dd/yyyy") & "'"
25
26 FillListView(ExecuteSQLQuery(sqlSTR), lstreturn, 0)
27 End Sub
28
29 Private Sub cmdselect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdselect.Click
30 With FrmDEFFECTIVE_RETURN_ADD
31 If lstreturn.Items.Count > 0 Then
32 lstreturn.Focus()
33 .txtpo.Text = lstreturn.FocusedItem.Text
34 .txtpo2.Text = lstreturn.FocusedItem.SubItems(1).Text
35 .txtreturn.Text = lstreturn.FocusedItem.SubItems(4).Text
36 Me.Close()
37 End If
38 End With
39 End Sub
40 End Class